function u = getArm(armAzi, armAlt, detLong, detLat)

% approximation for the arms
cosAlt = cos(armAlt);
sinAlt = sin(armAlt);

% compute some other trigonometrics
cosAz	= cos(armAzi);
sinAz	= sin(armAzi);
cosLat	= cos(detLat);
sinLat	= sin(detLat);
cosLon	= cos(detLong);
sinLon	= sin(detLong);

uNorth = cosAlt * cosAz;
uEast = cosAlt * sinAz;          
uRho = - sinLat * uNorth + cosLat * sinAlt;

u = [cosLon * uRho - sinLon * uEast,...
    sinLon * uRho + cosLon * uEast,...
    cosLat * uNorth + sinLat * sinAlt];


